import { getCityListApi, cityRulesApi } from '@/api'
export const syncgetCityList = async (store, val) => {
  try {
    const res = await getCityListApi(val)
    store.commit('getCityList', res)
    return Promise.resolve(res)
  } catch (error) {
    return Promise.reject(error)
  }
}
export const syncGetCityRules = async (store) => {
  const res = await cityRulesApi(store.state.city.value)
  console.log(res)
  store.commit('getCityRules', res)
}
export const syncsetHouseList = (store, val) => {
  store.commit('setHouseList', val)
}
